﻿@model IEnumerable<PhotoBlog.Core.Models.Album>
@{
    ViewBag.Title = "Альбомы";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<p>
    @Html.ActionLink("Добавить", "Create")
</p>
<table class="table table-hover table-striped">
    <tr>
        <th>
            Название
        </th>
        <th>
            Описание
        </th>
        <th>
            Фотографий
        </th>
        <th>
            Лого
        </th>
        <th>
            Скрытый
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.AlbumName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Description)
            </td>
            <td>
                @item.Photos.Count()
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Logo)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Hide)
            </td>
            <td>
                @Html.ActionLink("Ред.", "Edit", new { id = item.AlbumId }) |
                @Html.ActionLink("Удалить", "Delete", new { id = item.AlbumId })
            </td>
        </tr>
    }
</table>
